package net.atomtree.corrsepond.mode;

import java.util.Map;

/**
 * Created by czk on 2016/1/2.
 */
public class StageMode implements LinkMode {
    public static final int stageMode=0;
    public static final int stageIdMode=1;
    public static final int stageAttemptMode=2;
    public static final String ParamIsNull=null;

    @Override
    public int AnalyseMode(Map<String, String> URLParam) {
        if (ParamIsNull==URLParam.get("stageId")&&ParamIsNull==URLParam.get("attemptId"))
            return  stageMode;
        if(ParamIsNull!=URLParam.get("stageId")&&ParamIsNull==URLParam.get("attemptId"))
            return stageIdMode;
        return  stageAttemptMode;
    }
}
